import { getEnergyAnalyzeEnterpriseProportion } from '@/api/energy';

export default {
  data () {
    return {
      gridItemTwoData: {},
    }
  },
  methods: {
    async getGridItemTwoData () {
      const enterpriseId = this.$route.query.enterpriseId;
      if (!enterpriseId) {
        // console.warn(`[getGridItemTwoData]: enterpriseId is ${enterpriseId}`);
        return;
      }
      try {
        const { data } = await getEnergyAnalyzeEnterpriseProportion(enterpriseId);
        this.gridItemTwoData = data;
      } catch (e) {
        console.warn(e);
      }
    },
  },
}
